package com.william.yun.yunliwuli.util;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;


import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

@Slf4j

public class HttpUtils extends AbstractHttpUtils{

    @Override
    public String get(String uri, Map<String, String> headers) throws IOException {
        return getHttp(uri, headers);
    }

    @Override
    public String post(String uri, JSONObject object, Map<String, String> headers) throws IOException {
        return postHttp(uri, object, headers);
    }

    @Override
    public String post(String uri, JSONArray array, Map<String, String> headers) throws IOException {
        return postHttp(uri, array, headers);
    }


    @Override
    public String put(String url, JSONObject object, HashMap<String, String> headers) throws IOException {
        return putHttp(url, object, headers);
    }

    @Override
    public String delete(String url, JSONObject body, HashMap<String, String> headers) throws IOException {
       return deleteHttp(url,body, headers);
    }


}
